createAccount
Creates a new chart of accounts
/Accounts
Usage and SDK Samples
xero_client.set_token_set(user.token_set)
xeroTenantId = 'YOUR_XERO_TENANT_ID'
account = {
code: "123456",
name: "FooBar",
type: XeroRuby::Accounting::AccountType::EXPENSE,
description: "Hello World"
}
begin
response = xero_client.accounting_api.create_account(xeroTenantId, account)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling create_account: #{e}"
end
Scopes
| accounting.settings | Grant read-write access to organisation and account settings |
Parameters
| Name | Description |
|---|---|
| xero-tenant-id* |
String
Xero identifier for Tenant
Required
|
| Name | Description |
|---|---|
| account * |
Account
Account object in body of request
Required
|